#include <iostream>
using namespace std;
void getScore(string &game, int limit) {
  int win = 0, lose = 0;
  for (char &c : game) {
    if (c == 'E') {
      cout << win << ':' << lose << endl;
      return;
    } else if (c == 'W') {
      win++;
    } else {
      lose++;
    }
    if (abs(win - lose) >= 2 && (win >= limit || lose >= limit)) {
      cout << win << ':' << lose << endl;
      win = lose = 0;
    }
  }
}
int main() {
  string game, str;
  while (cin >> str) {
    game += str;
  }
  getScore(game, 11);
  cout << endl;
  getScore(game, 21);
}